# -*- coding: utf-8 -*-
"""
author:码同学 极光
date:2023/10/22
desc: 
sample: 
"""
#python 弱类型，动态
def do_something1(a1=10):
    print(type(a1),a1)
    return ''

def do_something2(a1,a2):
    print(type(a1),a1,type(a2),a2)


def do_something3(a1, *args):
    print(f"type_a {type(a1)}, type_args {type(args)} a1={a1}, a2={args}")


def do_something4(a1, **kwargs):
    print(f"type_a {type(a1)}, kwargs {type(kwargs)} a1={a1}, kwargs={kwargs}")

def do_something5(*args,**kwargs):
    print(f"args {type(args)}, kwargs {type(kwargs)} args={args}, kwargs={kwargs}")



if __name__ == '__main__':
    # do_something1('test')
    # do_something1(111)
    # do_something1(['1','2'])
    # do_something1()

    # do_something2(1,2)
    # do_something2(a1=1, a2='')
    # do_something2(a2=1,a1=12)

    # do_something3(1,2)
    # do_something3(1, 2,3,4)
    # do_something3(1, ['1','2'])
    # do_something3(a1=1, a2=12) #报错
    # do_something3(9, ("abc", "abc"))  # 如果是元组
    # info = {
    #     "age": 18,
    #     "status": True,
    #     "name": "极光"
    # }
    # do_something3(9, info)
    #
    #
    # do_something4(a1=1, a2=12)
    # do_something4(a1=1, a2=12,a3=1212)
    #
    info = {
        "age": 18,
        "status": True,
        "name": "极光",
        "pwd": "1212"
    }

    do_something4(a1=1,**info)
    # do_something5()
    # do_something5(11, 22)
    # do_something5(k1=11, k2=22)
    # do_something5(11, 22, k1=11)
    # do_something5((11, 22), k1=11, k2=22)
    # do_something5((11, 22), [1, 2], k1=11, k2=22)
    # do_something5((11, 22), k1=11, k2=22)
    #
    # print("1",'2',1212,12121,1212)
    # for i in range(10):
    #     print(i,end='_')


